package com.chinacoal.hr.levelimpl.model;

import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @author: YunTao.Li
 * @create: 2019-12-20 22:35
 * @description:
 **/
@Data
public class DayLawManager {
    public double workDay;
    public double natureDay;
    public List<DayLawItem> dayLawItems;

    public String toString() {
        if (this.getDayLawItems() != null && this.getDayLawItems().size() > 0) {
            for (int i = 0; i < this.getDayLawItems().size(); i++) {
                DayLawItem item = this.getDayLawItems().get(i);
                System.out.println("item_" + i + ":" + "date : " + new SimpleDateFormat("yyyy-MM-dd").format(item.getDate()) + " timeType:" + item.getTimeType());
            }
        }
        String str = "workDay:" + this.getWorkDay() + " natureDay:" + this.getNatureDay();
        System.out.println(str);
        return str;
    }
}
